Homework 1
----------

You are required to define the language IMP++ (without threads) using
the following operational styles, all in Maude:
- Big-step operational semantics
- Small-step operational semantics
- MSOS
- Reduction semantics with evaluation contexts.
The last feature of IMP++, the dynamic threads, as well as the
IMP++ definition in the CHAM, are left as extra-credit exercises.

This package contains the following files:
- imp-builtins.maude: a file that you should not touch, described in
builtins.pdf
- builtins.pdf: a short description of how to include with Maude builtins
- imp-syntax.maude: the syntax of IMP; you should extend this appropriately
- imp-programs.maude: several IMP programs that run in the provided
semantics
- imp-semantics-X.maude: shows a Maude X operational semantics of IMP
- imp.pdf: describes the IMP language, as well as its bigstep
semantics
- imp++.pdf: describes the IMP++ language.

The file imp++.pdf gives enough hints on how to do this homework.
However, feel free to not follow in detail my hints; all it matters is
that you make each semantics work.  If you find better ways to do it,
a plus for you (also, please let me know as well, I may give you
extra-credit for that if your solutions is really neat!).

When defining the syntax of the new constructs, make sure that the
following two programs (you can add them to imp-programs.maude)
parse:

eq sum++ = (
     s := 0 ; m := 0 ;
     while (true) do
       if (++ m <= n) then (
         s := s + m ;
         output m
       ) else halt

) .

eq nondet = (
     x := 1 ;
     x := ++ x / (++ x / x)
) .

You may also use them to test your semantics (though, of course, the
fact that you can run these does not mean that your semantics is
correct for sure).  To test them in your small step semantics, you
will probably have to write Maude commands like the following ones:

rewrite * < pgm sum++, n |-> 100, epsilon > .
search  * < pgm nondet, empty, epsilon > =>! Cfg:Configuration .

Here empty is the unit of State and epsilon is the unit of Output.
